import {createRouter, createWebHashHistory, type Router} from "vue-router";

const router: Router = createRouter({
    // Electron中路由方式必须使用Hash方式
    history: createWebHashHistory(),
    routes: [
        {
            path: '/',
            name: 'root',
            redirect: '/signin',
        },
        {
            path: '/signin',
            name: 'signin',
            component: () => import("@/views/SigninPage.vue"),
        },
        {
            path: '/main',
            component: () => import("@/views/MainPage.vue"),
            // children: [
            //     {
            //         path: '',
            //         redirect: '/main/overview',
            //     },
            // ]

        },
    ],
    /* 禁用鼠标侧键回退功能 */
    // scrollBehavior: () => {
    //     history.pushState(null, '', document.URL)
    // }
})

export default router